package com.bkgy.modular.test.exception;

/**
 * 自定义业务异常类
 */
public class SystemExceptionNew extends RuntimeException{
    /**
     * 错误编码
     */
    private String code;

    public SystemExceptionNew() {
        super();
    }

    public SystemExceptionNew(String message) {
        super(message);
    }

    public SystemExceptionNew(String message,Throwable cause){
        super(message,cause);
    }

    public SystemExceptionNew(String message,Throwable cause,boolean enableSuppression,boolean writableStackTrace){
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code){
        this.code = code;
    }

    @Override
    public String getMessage(){
        return super.getMessage();
    }

    @Override
    public String toString() {
        return this.code + ":" + this.getMessage();
    }


}
